package com.evolved.automata.experimental.speech;
import java.util.*;
public class RobotSpeechTools {
	
	public static HashMap<String,String> GetSpokenNumberStringMap()
	{
		HashMap<String,String> NumberTranslation = new HashMap<String,String>();
		NumberTranslation.put("zero", "0");
		NumberTranslation.put("one", "1");
		NumberTranslation.put("two", "2");
		NumberTranslation.put("three", "3");
		NumberTranslation.put("four", "4");
		NumberTranslation.put("five", "5");
		NumberTranslation.put("six", "6");
		NumberTranslation.put("seven", "7");
		NumberTranslation.put("eight", "8");
		NumberTranslation.put("nine", "9");
		return NumberTranslation;
	}
	
	public static HashMap<String,Integer> GetSpokenNumberIntegerMap()
	{
		HashMap<String,Integer> NumberTranslation = new HashMap<String,Integer>();
		NumberTranslation.put("zero", 0);
		NumberTranslation.put("one", 1);
		NumberTranslation.put("two", 2);
		NumberTranslation.put("three", 3);
		NumberTranslation.put("four", 4);
		NumberTranslation.put("five", 5);
		NumberTranslation.put("six", 6);
		NumberTranslation.put("seven", 7);
		NumberTranslation.put("eight", 7);
		NumberTranslation.put("nine", 9);
		return NumberTranslation;
	}
	
	public static String MapNumberNameToString(String numName)
	{
		numName=numName.trim();
		if (numName.toLowerCase().equals("zero"))
			return "0";
		else if (numName.toLowerCase().equals("one"))
			return "1";
		else if (numName.toLowerCase().equals("two"))
			return "2";
		else if (numName.toLowerCase().equals("three"))
			return "3";
		else if (numName.toLowerCase().equals("four"))
			return "4";
		else if (numName.toLowerCase().equals("five"))
			return "5";
		else if (numName.toLowerCase().equals("six"))
			return "6";
		else if (numName.toLowerCase().equals("seven"))
			return "7";
		else if (numName.toLowerCase().equals("eight"))
			return "8";
		else if (numName.toLowerCase().equals("nine"))
			return "9";
		else
			return "";
		
	}
	

	
}
